package com.codegeek.project.slope.domain;

import com.codegeek.common.utils.ReplaceIllegalChar;
import com.codegeek.framework.aspectj.lang.annotation.Excel;
import com.codegeek.framework.web.domain.BaseEntity;
import lombok.Data;

import java.util.Date;

/**
 * 监测项历史数据对象 slope_item_history
 *
 * @author codegeek
 * @date 2020-02-17
 */
@Data
public class SlopeItemHistory extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    private Long itemHistoryId;

    /**
     * 历史数据
     */
    @Excel(name = "历史数据")
    private String itemValueArr;

    /**
     * 数据日期
     */
    @Excel(name = "数据日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date date;

    /**
     * 监测项ID
     */
    @Excel(name = "监测项ID")
    private Long itemId;

    private SlopeMonitorItem item;

    private Integer statusOption;

    private Integer sensorType;

    private String deviceName;

    private String sensorIdArr;

    public void setItemValueArr(String itemValueArr) {
        this.itemValueArr = new ReplaceIllegalChar().replace(itemValueArr);
    }

    public void setDeviceName(String deviceName) {
        this.deviceName = new ReplaceIllegalChar().replace(deviceName);
    }

    public void setSensorIdArr(String sensorIdArr) {
        this.sensorIdArr = new ReplaceIllegalChar().replace(sensorIdArr);
    }
}
